﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Core.Master" AutoEventWireup="true" CodeBehind="AssociationsLinks.aspx.cs" Inherits="Pap.Web.Modules.Membership.Views.AssociationsLinks" 
meta:resourcekey="PageResource1"%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript">

    var linkAjaxMethod = function (value) {
        //do stuff          
        if (value != null)
            return String.format('<a href={0}>{0}</a>', value)//Coolite Ajax Method;
        else
            return "";
    }     
</script> 
<ext:Store runat="server" ID="storeCommitteesURLs">
    <Reader>
        <ext:JsonReader>
            <Fields>
                <ext:RecordField Name="CommitteeURLID"></ext:RecordField>
                <ext:RecordField Name="CommitteeName"></ext:RecordField>
                <ext:RecordField Name="CommitteeURL"></ext:RecordField>
                <ext:RecordField Name="CommitteeID"></ext:RecordField>
                
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>
<ext:FitLayout ID="FitLayout1" runat="server" meta:resourcekey="FitLayoutResource1">
<ext:GridPanel runat="server" ID="gvCommitteesURLs" StoreID="storeCommitteesURLs">
           
    <ColumnModel>
        <Columns>
            
            <ext:Column DataIndex="CommitteeName" Header="<%$ Resources:HeaderCommitteeName %>"></ext:Column>
            <ext:Column DataIndex="CommitteeURL" Header="<%$ Resources:HeaderCommitteeURL %>">
            <Renderer Fn="linkAjaxMethod" /> 
            <Editor>
                <ext:TextField runat="server" ID="txtURL" AllowBlank="true"></ext:TextField>
            </Editor>
            </ext:Column>
            
        </Columns>
    </ColumnModel>
    <TopBar>
                <ext:Toolbar ID="Toolbar1" runat="server"> 
                    <Items>
                              <ext:Button runat="server" Icon="Accept" ID="btnSubmit" meta:resourcekey="btnSubmitResource1">
                    <AjaxEvents>
                        <Click OnEvent="Btn_Submit">
                        <ExtraParams>
                                        <ext:Parameter Name="gvCommitteesURLs" Mode="Raw" Value="Ext.encode(#{gvCommitteesURLs}.getRowsValues(false))" />
                                    </ExtraParams>
                            <EventMask ShowMask="true" />
                        </Click>
                    </AjaxEvents>
                </ext:Button>
                          
                    </Items>
                </ext:Toolbar>
                </TopBar>
                <BottomBar>
                <ext:StatusBar ID="StatusBar1" runat="server">
                    <Items>
                        <ext:Button ID="Button1" runat="server" Text="Back" Icon="ArrowUndo">
                            <AjaxEvents>
                                <Click OnEvent="btnBack_Click">
                                </Click>
                            </AjaxEvents>
                        </ext:Button>
                    </Items>
                </ext:StatusBar>
            </BottomBar>
</ext:GridPanel>
</ext:FitLayout>
</asp:Content>
